<?php if (! defined('APPPATH')) die('No direct script access allowed');
/**
 * RENARTI IK
 * An open source application development framework for PHP 5.2.0 or newer
 *
 * @package		RtiFramework
 * @author		Nauris Dambis <nauris.dambis@renarti.com>
 * @copyright	Copyright (c) 2012, RENARTI IK.
 * @license		http://renarti.com/#license
 * @link		http://renarti.com
 * @since		Version 1.0
 */

class RtiModel
{
	public function __get($key)
	{
		$objects = Rti::getLoadedObjects();
		
		if (isset($objects[$key]))
		{
			return $objects[$key];
		}
		else 
		{
			if (substr($key, 0, 1) != '_')
			{
				$methods = get_class_methods('Rti');
				
				if (in_array($key, $methods))
				{
					return Rti::$key();
				}
				else 
				{
					return FALSE;
				}
			}
			else
			{
				return FALSE;
			}
		}
	}
	
	public function getTableName()
	{
		return '';
	}
	
	public function getPK()
	{
		return array();
	} 
	
	public function insert()
	{
	}
	
	public function update()
	{
	}
	
	public function delete()
	{
	}
	
}

/* End of file RtiModel.php */
/* Location: ./system/core/RtiModel.php */
